<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>

<body>
    <input type=text id="myFocus" style="width: 100px;" >
    <input type=text id="myFocus2" style="width: 100px;" >
    <div type=text id="myFocus3" style="width: 100px;height: 100px;background-color: pink;" >
    <script>
        document.getElementById("myFocus2").focus();
    </script>
</body>

</html>